using System.Collections.Generic;

namespace Rhinestone.Domain
{
    /// <summary>
    /// The <see cref="IProjectsService"/> interface defines a contract that consumers
    /// can use to manage projects in <see cref="Rhinestone"/>
    /// </summary>
    public interface IProjectsService
    {
        /// <summary>
        /// Gets a listing of all projects created in the system.
        /// </summary>
        /// <returns>An <see cref="IEnumerable{T}"/> that can be used to enumerate over the list of projects returned.</returns>
        IEnumerable<Project> GetAllProjects();
        /// <summary>
        /// Gets a project with the specified id.
        /// </summary>
        /// <returns>A <see cref="Project"/> instance whose id matches the specified id, else a null reference if no project with the specified id was found.</returns>
        Project GetProjectByID(int projectID);
        /// <summary>
        /// Gets a project that has the specified project code.
        /// </summary>
        /// <param name="projectCode">string. The unique code of the project to find.</param>
        /// <returns>A <see cref="Project"/> instance whose code matches the code that was specified, else a null refernece if no project that matched the specified project code was found.</returns>
        Project GetProjectByCode(string projectCode);

        /// <summary>
        /// Saves a project.
        /// </summary>
        /// <param name="project">The <see cref="Project"/> instance to save.</param>
        void SaveProject(Project project);
        /// <summary>
        /// Deletes a project.
        /// </summary>
        /// <param name="project">The <see cref="Project"/> instance to delete.</param>
        void DeleteProject(Project project);
    }
}